package Homework0815;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Note {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("./note.txt");
        Scanner sc=new Scanner(System.in);
        String input=sc.nextLine();
        while(true)
        {
            if(input.equals("exit"))
                break;
            byte[] bytes=input.getBytes(StandardCharsets.UTF_8);
            fos.write(bytes);
            input=sc.nextLine();
        }
        fos.close();
    }
}
